// // object
// type PartialPointX = { x: number; };
// type PartialPointY = { y: number; };
// type PartialPoint = PartialPointX | PartialPointY;
// let p: PartialPoint = {x: 10, y: 20} // 联合类型 要么x要么y要么xy
// console.log(p);



// type PartialPointX = { x: number; };
// type Point = PartialPointX & { y: number; }; // 交叉类型 必须两个都有
// let p: Point = { x: 19, y: 20 }
// console.log(p);


// type PartialPointX = { x: number; };
// interface Point extends PartialPointX { y: number; }
// let p: Point = { x: 19, y: 20 }
// console.log(p);

